package com.foundryx.shared.exception;

/**
 * @className: SystemException
 * @author: ocxz1
 * @date: 2025/6/20 上午11:07
 * @Version: 1.0
 * @description: fx-share-resources 系统异常：表示程序内部错误或第三方调用失败等严重问题
 */
public final class SystemException extends BaseException implements HasErrorCode {

    private final static int ERROR_CODE = 500;
    private final static String DEFAULT_MESSAGE = "系统发生了错误，请联系管理员";

    public SystemException(String msgCode, Throwable cause, Object... args) {
        super(ERROR_CODE, msgCode, resolveMessage(msgCode, DEFAULT_MESSAGE, args), cause, args);
    }

    @Override
    public String getDefaultMessage() {
        return DEFAULT_MESSAGE;
    }
}
